from commands.core.command import Command
from plugins.core.plugman import PlugMan

class PlugunCmd(Command):

    def __init__(self):
        self.names = ["plugun", "pgun"]
        self.has_args = True
  
    def check_args(self, args: list):
        if len(args) > 0:
            return None
        else: return "Error: Incorrect arguments!"

    def execute(self, args: list, obj):
        check = self.check_args(args)
        if not check is None: return check 

        plugman = PlugMan()
        return plugman.remove_plugin(args[0])

